﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace HengTong.DataAccess.Migrations
{
    /// <inheritdoc />
    public partial class 用人需求池直接生成招聘发布申请初步实现 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<bool>(
                name: "IsPublished",
                table: "SysHrStaffPool",
                type: "bit",
                nullable: true);

            migrationBuilder.AddColumn<Guid>(
                name: "RecruitPublishRequestBillId",
                table: "SysHrStaffPool",
                type: "uniqueidentifier",
                nullable: true);

            migrationBuilder.CreateIndex(
                name: "IX_SysHrStaffPool_RecruitPublishRequestBillId",
                table: "SysHrStaffPool",
                column: "RecruitPublishRequestBillId");

            migrationBuilder.AddForeignKey(
                name: "FK_SysHrStaffPool_SysHrRecruitPublishRequestBill_RecruitPublishRequestBillId",
                table: "SysHrStaffPool",
                column: "RecruitPublishRequestBillId",
                principalTable: "SysHrRecruitPublishRequestBill",
                principalColumn: "ID");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_SysHrStaffPool_SysHrRecruitPublishRequestBill_RecruitPublishRequestBillId",
                table: "SysHrStaffPool");

            migrationBuilder.DropIndex(
                name: "IX_SysHrStaffPool_RecruitPublishRequestBillId",
                table: "SysHrStaffPool");

            migrationBuilder.DropColumn(
                name: "IsPublished",
                table: "SysHrStaffPool");

            migrationBuilder.DropColumn(
                name: "RecruitPublishRequestBillId",
                table: "SysHrStaffPool");
        }
    }
}
